package cont

import (
	"github.com/labstack/echo"
)

func RouteApi(g *echo.Group) {
	g.Any("/cate/list", ShowCategoryListHandler)
	g.Any("/cate/tree", ShowCategoryTreeHandler)
	g.Any("/list", ShowContentListHandler)
	g.Any("/detail", ShowContentDetailHandler)
	g.Any("/eval", EvaluateContentHandler)
}

func RouteAdminApi(g *echo.Group)  {
	g.POST("/cate/create", CreateCategoryHandler)
	g.POST("/cate/delete", DeleteCategoryHandler)
	g.POST("/cate/update", UpdateCategoryHandler)
	g.POST("/create", CreateContentHandler)
	g.POST("/delete", DeleteContentHandler)
	g.POST("/update", UpdateContentHandler)
}